//时间格式化工具
 //更改后的时间格式为2024-03-25 22:57:48
//根据列表进行的时间格式化
export function formatTime(row, column, cellValue) {
    if (cellValue === null || cellValue === undefined) {
        return "";
    }
    let date = new Date(cellValue);
    return date.toLocaleString('zh-CN', {
        year: 'numeric',
        month: '2-digit',
        day: '2-digit',
        hour: '2-digit',
        minute: '2-digit',
        second: '2-digit'
    }).replace(/\//g, '-');
};
//更改后的时间格式为2024-03-25 22:57:48
//根据表单进行的时间格式化
export function formatTimeNew(value) {
    if (!value) return "";
    const date = new Date(value);
    const year = date.getFullYear();
    const month = (date.getMonth() + 1).toString().padStart(2, '0');
    const day = date.getDate().toString().padStart(2, '0');
    const hours = date.getHours().toString().padStart(2, '0');
    const minutes = date.getMinutes().toString().padStart(2, '0');
    const seconds = date.getSeconds().toString().padStart(2, '0');
    return `${year}-${month}-${day}  ${hours}:${minutes}:${seconds}`;
}